<?php
$page = ($page >= 2) ? $page : 1;
$rows_per_page = 24;
$page_start = ($page - 1) * $rows_per_page;
$page_end = $page * $rows_per_page;
//Khối tin cat
$db_list_news = new db_query('SELECT new_id,new_title,new_date,new_picture,new_teaser,new_detail,new_tags,new_relate,new_active,new_cat_id
                                FROM news 
                                WHERE new_cat_id = '.$iCat.' AND new_active = 1
                                ORDER BY new_id DESC 
                                LIMIT '.$page_start . ', '. $rows_per_page);
$list_news = $db_list_news->resultArray();
unset($db_list_news);
$total_list = count($list_news);

?>